/**
 * 
 */
package domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author yfekih
 *
 */

@Entity
@Table(name = "TB_ASSIGNMENT_MISSION")
public class DroneMission {

	/**
	 * 
	 */
	
	public final static String MISSION_MAPPING_NAME = "mission";
	
	public final static String DRONE_MAPPING_NAME = "drone";
	
	@EmbeddedId
	private DroneMissionPK droneMissionPK;
	
	@Column(name="DATE_HEURE_DEPART")
	@Temporal(TemporalType.TIMESTAMP)
	private Date dateHeureDepart;
	
	
	@ManyToOne(targetEntity = Mission.class)
	@JoinColumn(name = "MISSION_ID", insertable = false, updatable = false)
	private Mission mission;
	
	@ManyToOne(targetEntity = Drone.class)
	@JoinColumn(name = "DRONE_ID", insertable = false, updatable = false)
	private Drone drone;

	public DroneMissionPK getDroneMissionPK() {
		return droneMissionPK;
	}

	public void setDroneMissionPK(DroneMissionPK droneMissionPK) {
		this.droneMissionPK = droneMissionPK;
	}

	public Date getDateHeureDepart() {
		return dateHeureDepart;
	}

	public void setDateHeureDepart(Date dateHeureDepart) {
		this.dateHeureDepart = dateHeureDepart;
	}

	public Mission getMission() {
		return mission;
	}

	public void setMission(Mission mission) {
		this.mission = mission;
	}

	public Drone getDrone() {
		return drone;
	}

	public void setDrone(Drone drone) {
		this.drone = drone;
	}

	
}
